package com.ruoyi.common.config;

import com.ruoyi.common.config.properties.MinioProperties;
import io.minio.MinioClient;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Slf4j
@Configuration
@RequiredArgsConstructor
public class MinioConfig {

//    private final MinioProperties minioProperties;
//
//
//    @Bean
//    public MinioClient minioClient() {
//        try {
//            log.info("Initializing MinioClient with endpoint: {}", minioProperties.getEndpoint());
//
//            return MinioClient.builder()
//                    .endpoint(minioProperties.getEndpoint())
//                    .credentials(minioProperties.getAccessKey(), minioProperties.getSecretKey())
//                    .build();
//        } catch (Exception e) {
//            log.error("Error initializing MinioClient: {}", e.getMessage(), e);
//            throw new RuntimeException("Error initializing MinioClient", e);
//        }
//    }
}
